using System;
using System.Threading;
using System.Threading.Tasks;
using IrcNetLib;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace FW.Tests
{
    [TestClass]
    public class ClientTests
    {
        private ManualResetEvent mrConnect;
        /// <summary>
        /// BDD : Connect to europnet, join #mydummychan, send "Hello World!", Assert everything is alright, and finally, disconnect.
        /// </summary>
        [TestMethod]
        public async Task TestConnectAndSend()
        {
            mrConnect = new ManualResetEvent(false);
            
            IrcClient client = new IrcClient("irc.undernet.org", 6667);
            client.ClientConnected += Client_OnConnected;
            await client.Connect();

        }

    
        private void Client_OnConnected(object sender, ConnectedArgs e)
        {
            mrConnect.Reset();
        }
    }
}
